home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / netz / amyboard / xboard-3.3.pl0 / backend.h < prev    next >
C/C++ Source or Header  |  1995-08-12  |  6KB  |  156 lines

  1. /*
  2.  * backend.h -- Interface exported by XBoard back end
  3.  * $Id: backend.h,v 1.23 1995/07/19 03:20:16 mann Exp $
  4.  *
  5.  * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
  6.  * Enhancements Copyright 1992-95 Free Software Foundation, Inc.
  7.  *
  8.  * The following terms apply to Digital Equipment Corporation's copyright
  9.  * interest in XBoard:
  10.  * ------------------------------------------------------------------------
  11.  * All Rights Reserved
  12.  *
  13.  * Permission to use, copy, modify, and distribute this software and its
  14.  * documentation for any purpose and without fee is hereby granted,
  15.  * provided that the above copyright notice appear in all copies and that
  16.  * both that copyright notice and this permission notice appear in
  17.  * supporting documentation, and that the name of Digital not be
  18.  * used in advertising or publicity pertaining to distribution of the
  19.  * software without specific, written prior permission.
  20.  *
  21.  * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  22.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  23.  * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  24.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  25.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  26.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  27.  * SOFTWARE.
  28.  * ------------------------------------------------------------------------
  29.  *
  30.  * The following terms apply to the enhanced version of XBoard distributed
  31.  * by the Free Software Foundation:
  32.  * ------------------------------------------------------------------------
  33.  * This program is free software; you can redistribute it and/or modify
  34.  * it under the terms of the GNU General Public License as published by
  35.  * the Free Software Foundation; either version 2 of the License, or
  36.  * (at your option) any later version.
  37.  *
  38.  * This program is distributed in the hope that it will be useful,
  39.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  40.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  41.  * GNU General Public License for more details.
  42.  *
  43.  * You should have received a copy of the GNU General Public License
  44.  * along with this program; if not, write to the Free Software
  45.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  46.  * ------------------------------------------------------------------------
  47.  */
  48. #include "lists.h"
  49.  
  50. extern GameMode gameMode;
  51. extern int pausing, cmailMsgLoaded, flipView;
  52. extern FILE *fromUserFP, *toUserFP, *debugFP;
  53.  
  54. void SetWhiteToPlayEvent P((void));
  55. void SetBlackToPlayEvent P((void));
  56. void InitBackEnd1 P((void));
  57. void InitBackEnd2 P((void));
  58. int IsPromotion P((int fromX, int fromY, int toX, int toY));
  59. int OKToStartUserMove P((int x, int y));
  60. void Reset P((int redraw));
  61. void ResetGameEvent P((void));
  62. int LoadGame P((FILE *f, int n, char *title, int useList));
  63. int CmailLoadGame P((FILE *f, int n, char *title, int useList));
  64. int ReloadGame P((int offset));
  65. int SaveGame P((FILE *f, int dummy, char *dummy2));
  66. int LoadPosition P((FILE *f, int n, char *title));
  67. int SavePosition P((FILE *f, int dummy, char *dummy2));
  68. void EditPositionEvent P((void));
  69. void FlipViewEvent P((void));
  70. void MachineWhiteEvent P((void));
  71. void MachineBlackEvent P((void));
  72. void TwoMachinesEvent P((void));
  73. void EditGameEvent P((void));
  74. void IcsClientEvent P((void));
  75. void ForwardEvent P((void));
  76. void BackwardEvent P((void));
  77. void ToEndEvent P((void));
  78. void ToStartEvent P((void));
  79. void RevertEvent P((void));
  80. void RetractMoveEvent P((void));
  81. void MoveNowEvent P((void));
  82. void TruncateGameEvent P((void));
  83. void PauseEvent P((void));
  84. void CallFlagEvent P((void));
  85. void AcceptEvent P((void));
  86. void DeclineEvent P((void));
  87. void DrawEvent P((void));
  88. void AbortEvent P((void));
  89. void AdjournEvent P((void));
  90. void ResignEvent P((void));
  91. void StopObservingEvent P((void));
  92. void StopExaminingEvent P((void));
  93. void ShowThinkingEvent P((int newState));
  94. void HintEvent P((void));
  95. void BookEvent P((void));
  96. void AboutGameEvent P((void));
  97. void ExitEvent P((int status));
  98. char *DefaultFileName P((char *));
  99. void UserMoveEvent P((int fromX, int fromY, int toX, int toY, int promoChar));
  100. void DecrementClocks P((void));
  101. char *TimeString P((long millisec));
  102. void LoadGameLoop P((void));
  103. void DisplayBothClocks P((void));
  104. void EditPositionMenuEvent P((ChessSquare selection, int x, int y));
  105. int ParseTimeControl P((char *tc));
  106. void ProcessICSInitScript P((FILE * f));
  107. void EditCommentEvent P((void));
  108. void ReplaceComment P((int index, char *text));
  109. int ReplaceTags P((char *tags, GameInfo *gi));/* returns nonzero on error */
  110. void AppendComment P((int index, char *text));
  111. void ReloadCmailMsgEvent P((int unregister));
  112. void MailMoveEvent P((void));
  113. void EditTagsEvent P((void));
  114.  
  115. char *StrStr P((char *string, char *match));
  116. char *StrSave P((char *s));
  117. char *StrSavePtr P((char *s, char **savePtr));
  118.  
  119. #ifndef _amigados
  120. int StrCaseCmp P((char *s1, char *s2));
  121. int ToLower P((int c));
  122. int ToUpper P((int c));
  123. #else
  124. #define StrCaseCmp Stricmp  /*  Use utility.library functions   */
  125. #include <proto/utility.h>
  126. #endif
  127.  
  128. extern GameInfo gameInfo;
  129.  
  130.  
  131.  
  132. /* pgntags.c prototypes
  133.  */
  134. char *PGNTags P((GameInfo *));
  135. void PrintPGNTags P((FILE *f, GameInfo *));
  136. int ParsePGNTag P((char *, GameInfo *));
  137. char *PGNResult P((ChessMove result));
  138.  
  139.  
  140. /* gamelist.c prototypes
  141.  */
  142. /* A game node in the double linked list of games.
  143.  */
  144. typedef struct _ListGame {
  145.     ListNode node;
  146.     int number;
  147.     unsigned long offset;   /*  Byte offset of game within file.     */
  148.     GameInfo gameInfo;      /*  Note that some entries may be NULL. */
  149. } ListGame;
  150.  
  151. extern List gameList;
  152. void ClearGameInfo P((GameInfo *));
  153. int GameListBuild P((FILE *));
  154. void GameListInitGameInfo P((GameInfo *));
  155. char *GameListLine P((int, GameInfo *));
  156.